require.config {
    paths: {
        "jquery": "jquery-min.js",
        "preFix": "prefixfree-min.js",
        "bootstrap": "bootstrap-min.js",
        "modernizr": "modernizr-min.js"
    },
    shim : {
        "bootstrap":{
            deps:["jquery"]
        }
    }
}
localStorge = @.localStorge
require ["bootstrap","preFix"], ()->
  (($)->
    ($ "#switch-icon").on "click", ()->
      ($ "#list-container").toggleClass "big"
      if localStorge
        localStorge.iconStyle = ($ "#list-container").attr "class"

    if localStorge
      localStorge.iconStyle = ($ "#list-container").attr "class"

    ($ "body").fadeIn()

    ($ ".txt").on "click", ()->
      if (confirm "使用高亮工具查看文档？\n确定：工具查看文件；\n取消：直接打开。")
        open "/prettify?#{this.href}?handle=false"
        false
    ($ "#send-words").on "click", ()->
      url = "/agent?#{($ this).attr "data-domain"}nodeLib/html/message.html"
      newWin = open url,"newwindow","height=640,width=1000,top=60,left=#{document.body.clientWidth / 2 - 500 },toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no"
      window.sendOK = ()->
        newWin.close()
  ) jQuery